<?php 
$news = $viewModel->get("news");
$cates = $viewModel->get("categories");
$relates = $viewModel->get("relatePage");
foreach ($cates AS $cate){
    if($cate->category_id == $news->category_id){
        $curCate = $cate->category_name;
    }
}

?>
<div id="leftcol">
	<div class="leftads">
		<a><a href="<?php echo BASE_URL.'home'?>">TRANG CHỦ</a><?php echo htmlentities(" > ")?><a href="<?php echo BASE_URL.'home/viewsContent/' .$news->category_id?>"><?php echo $curCate;?></a></a> 
		<hr>
	</div>
	<!--end left ads 1 -->
    <?php 
        $imgAlt = Helper::getFirstImage($news->body);
    ?>
	<img src="<?php echo $imgAlt[0]; ?>" alt="<?php echo $imgAlt[1];?>" width="240px" height="180px" class="img-details">

	<h3><?php echo $news->title;?></h3>
	<p style="font-weight:bold; color:red;"></p><br>
	<div class="p_details">
		<p style="text-align: justify;">
			<span style="font-size: small;">
				<strong>&nbsp;&nbsp;<?php echo $news->content?></strong>
			</span>
		</p>
	</div>

	<div class="p_details">
		<p style="text-align: justify;" class="Normal">&nbsp;&nbsp;<?php echo $news->body?></p>
    </div>
	<hr style="color:red">
	<div class="othernews">
		<h4>CÁC TIN TỨC KHÁC:</h4>
		<ul>
            <?php
                foreach($relates as $relate){
            ?>
			<li>
				<a href="<?php echo BASE_URL.'Home/ViewDetail/'.$relate->news_id;?>"><?php echo $relate->title ?></a>
			</li>
            <?php
            }
            ?>
		</ul>
	</div>
	<!-- end cat hot news 1 -->
</div>